package cn.dsp.admin.mapper;


import cn.dsp.admin.entity.Permission;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

@Repository
public interface PermissionMapper {
    /***添加新权限*/
    Integer savePerm(Permission permission);

    /**查询*/
    Permission findPermByPid(Integer pid);

    Permission findPermByName(String name);

    Set<Permission> findPermByRid(Integer rid);


    List<Permission> findPermAll();

    /**改*/
    Integer updatePermByPid(Permission permission);

    /**删除*/
    Integer removePermByPid(Integer pid);
}
